<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<html>
<head>
	<meta name="decorator" content="moduleEdit" />
	<script type="text/javascript">
		$(document).ready(function() {
			$("#styleName").focus();
			$("#brandStyleForm").validate({
				submitHandler: function(form){
					Oosp_Loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<div class="panel panel-default">
	  <div class="panel-heading">
	    <h3 class="panel-title">新增风格信息
	    <a class="btn btn-default btn-sm pull-right o-a-button" role="button" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
	    </h3>
	  </div>
	  <div class="panel-body">
		<form:form id="brandStyleForm" modelAttribute="brandStyle" action="${contextPath}/biz/brand/style/save" method="post" class="form-horizontal" role="form">
			<form:hidden path="id"/>
			<tags:message content="${message}"/>
				<div class="form-group">
				<label for="styleName" class="col-sm-3 control-label">风格名称:</label>
				<div class="col-sm-4">
					<form:input id="styleName" path="styleName" maxlength="20" class="form-control required"/>
				</div>
			</div>
			<div class="form-group">
			  <div class="col-sm-offset-3 col-sm-10">
			    <input class="btn btn-primary" type="submit" value="保 存"/>
				<input class="btn btn-default" type="button" value="返 回" onclick="history.go(-1)"/>
			  </div>
			</div>
		</form:form>
	  </div>
	</div>
</body>
</html>